package org.JWCB.friend.controller.user;


import lombok.Getter;
import org.JWCB.common.core.constants.HttpConstants;
import org.JWCB.common.core.controller.BaseController;
import org.JWCB.common.core.domain.vo.R;
import org.JWCB.common.core.domain.vo.TableDataInfo;
import org.JWCB.friend.domain.exam.dto.ExamQueryDto;
import org.JWCB.friend.domain.user.dto.ExamSignUpDto;
import org.JWCB.friend.service.user.UserExamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("user/exam")
public class UserExamController extends BaseController {

    @Autowired
    private UserExamService userExamService;
    @PostMapping("/signUp")
    public R<Void> signUp( @Validated @RequestBody ExamSignUpDto examSignUpDto) {
        return toR(userExamService.signUp(examSignUpDto));
    }


    @GetMapping("/list")
    public TableDataInfo list(ExamQueryDto queryDto) {
       return userExamService.list(queryDto);
    }
}
